package com.feinno.urcs.group.entity;

import com.feinno.superpojo.SuperPojo;
import com.feinno.superpojo.annotation.Field;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author Li.Hongbo <lihongbo@feinno.com>
 */
@XmlRootElement(name = "UserGroupCount")
public class UserGroupCount extends SuperPojo {
	@Field(id = 1)
	private int resultCode;//返回结果码
	@Field(id = 2)
	private String description;//返回结果描述
	@Field(id = 3)
	private int createGroupCount;//用户创建群数量
	@Field(id = 4)
	private int joinGroupCount;//用户加入群数量
	@Field(id = 5)
	private int manageGroupCount;//用户管理群数量


	@XmlElement(required = true)
	public int getResultCode() {
		return resultCode;
	}

	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}

	@XmlElement(required = true)
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@XmlElement(required = true)
	public int getCreateGroupCount() {
		return createGroupCount;
	}

	public void setCreateGroupCount(int createGroupCount) {
		this.createGroupCount = createGroupCount;
	}

	@XmlElement(required = true)
	public int getManageGroupCount() {
		return manageGroupCount;
	}

	public void setManageGroupCount(int manageGroupCount) {
		this.manageGroupCount = manageGroupCount;
	}

	@XmlElement(required = true)
	public int getJoinGroupCount() {
		return joinGroupCount;
	}

	public void setJoinGroupCount(int joinGroupCount) {
		this.joinGroupCount = joinGroupCount;
	}

	/**
	 * 用户创建群数量
	 *
	 * @param incr
	 */
	public void incrCreateGroupCount(int incr) {
		setCreateGroupCount(this.getCreateGroupCount() + incr);
	}

	/**
	 * 用户加入群数量
	 *
	 * @param incr
	 */
	public void incrJoinGroupCount(int incr) {
		setJoinGroupCount(this.getJoinGroupCount() + incr);

	}

	/**
	 * 用户管理群数量
	 *
	 * @param incr
	 */
	public void incrManageGroupCount(int incr) {
		setManageGroupCount(this.getManageGroupCount() + incr);

	}
}
